transform

inline fun <R> transform(successTransform: (T) -> Try<R>, failureTransform: (Throwable) -> Try<R>): Try<R>

Transforms a Success using successTransform or a Failure using failureTransform.

Return

New Try being a result of a transformation of a Success with successTransform or a Failure with failureTransform.

Parameters

successTransform

Function transforming value of a Success to a new Try.

failureTransform

Function transforming exception from a Failure to a new Try.